<template>
  <div class="group_wrap">
    <div class="slides">
    <ul id="containers">

      <li tid="newsid" type="ciate" v-for="(item,index) in newsData1"  @click="onItem(item.newsId)">
      <p tid="title_name">{{item.title}}</p>
      <p tid="time">
        {{item.publishDate}}
      </p>
      </li>

      </ul>
    </div>
  </div>
</template>
<style  scoped>
  .group_wrap ul {
    padding: 0.2rem 0 5% 0.3rem;
  }
  .slides ul li:first-child{
    padding-top:0 !important;
  }
  .group_wrap ul li[type='ciate'] {
    width: 100% !important;
    display: flex;
    display: -webkit-flex;
    flex-direction: column;
    justify-content: space-around;
    align-content: space-around;
    border-bottom: 1px solid #eee;
    padding:0.25rem 0;
  }

  .slides ul li[type='ciate'] p:first-child {
    text-align: justify;
    margin-bottom:0.25rem;
    font-size:0.3rem;

  }

  .slides ul li[type='ciate'] p {
    padding-right: 5%;
    text-align: justify;
  }
</style>
<script >
  import {mapGetters} from 'vuex';
  export default{
    props:['cityid','newsData1'],
    data(){
      return{
        cityloctiaon:0
      }
    },
    watch:{
      cityid:(newVal) => {
        console.log(newVal)
      },

    },
  computed:{

     //...mapGetters({dataList:'getNewsData'})
    },
    methods:{
       //这里写ajax方法调用；
      onItem(ids){
       this.$router.push({path:'/newdatails',query: { id:ids }});
      }
    },
    mounted(){


    }
  }
</script>
